﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Web;

namespace Coding4Fun.Cannon.Web
{
	public static class Logger
	{
		static string _path;

		public static void WriteToLog(string command, string data = "")
		{
			//EventLog.WriteEntry(command, data);
			File.AppendAllText(_path,
			                   String.Format("{2}: Command: {0} - {1}{3}", command, data, DateTime.Now, Environment.NewLine));
		}

		public static void SetPath(string path)
		{
			_path = Path.Combine(path, @"log.txt");
		}
	}
}